<?php  
namespace app\library\validate;
use think\Validate;

/**
 * 用户验证器
 * @package app\admin\validate
 */
class Seat extends Validate{
    //定义验证规则
    protected $rule = [
        'id'             => 'require|number',
        'areaid' 		 => 'require|number',
        'seatarr'     	 => 'require',
    ];

    //定义验证提示
    protected $message = [
        'areaid.require'    => '区域id不能为空',
        'seatarr.require'   => '请添加座位',
    ];

    //定义验证场景
    protected $scene = [
        'layout' => ['areaid','seatarr'],
    ];
}
?>